package br.edu.ufcg.lsd.wbis.ui.client.ui.loggedin.util.locking;

import br.edu.ufcg.lsd.wbis.ui.client.ui.GenericWindow;
import br.edu.ufcg.lsd.wbis.ui.client.ui.ResetButtonListener;
import br.edu.ufcg.lsd.wbis.ui.client.ui.management.PanelManager;

import com.gwtext.client.widgets.Button;

/**
 * @author Renato Miceli
 */
public class UnlockingWindow extends GenericWindow {

	public UnlockingWindow(PanelManager panelManager) {
		this.setTitle("Unlock");
		this.setWidth(300);
		this.setHeight(25);
		this.setMinWidth(200);
		this.setMinHeight(25);

		this.setClosable(false);
		
		final UnlockingFormPanel unlockingPanel = new UnlockingFormPanel(panelManager);

		this.addButton(new Button("Unlock", new UnlockingButtonListener(this, unlockingPanel, panelManager)));
		this.addButton(new Button("Clear", new ResetButtonListener(unlockingPanel)));
		this.add(unlockingPanel);

		this.show();
	}
}
